﻿namespace App.Services
{
    public class GreetingService : IGreetingService
    {
        public string Greeting(DateTimeOffset time) => time.Hour switch
        {
            var h when h > 5 && h < 12 => "good morning",
            var h when h >= 12 && h < 17 => "good afternooning",
            _ => "good evening"
        };
    }
}
